<template>
  <el-table :data="tableData">
    <el-table-column
      v-for="(item, index) in tableColumns"
      :key="index"
      :label="item.title"
      :prop="item.prop">
      <template v-if="item.slot" v-slot:[item.slot]>
      </template>
      <template v-else slot-scope="{ row }">{{ row[item.prop] }}</template>
    </el-table-column>
  </el-table>
</template>

<script>
export default {
  name: 'BaseTable',
  props: {
    tableData: {
      type: Object,
      required: true
    },
    tableColumns: {
      type: Object,
      required: true
    }
  }
}
</script>